#include <gfx/iprogram.h>
#include <gfx/gl20/effecttechnique_gl20.h>

ceEffectTechniqueGL20::ceEffectTechniqueGL20 ()
  : _currentProgram (0)
{
  CE_OBJECT_CONSTR
  for (unsigned i=0; i<RP_Count; i++)
    {
      _programs[i] = 0;
    }
}

void ceEffectTechniqueGL20::SetProgram(ceRenderPass pass, iProgram *program)
{
  CE_SET(_programs [pass], program);

}

iProgram* ceEffectTechniqueGL20::GetProgram(ceRenderPass pass)
{
  return _programs[pass];
}

iProgram *ceEffectTechniqueGL20::BeginPass(ceRenderPass pass)
{
  _currentProgram = _programs[pass];
	return _currentProgram;
}

void ceEffectTechniqueGL20::EndPass(ceRenderPass )
{
  _currentProgram = 0;
}

